#include "facade.h"
#include <iostream>

SubSystemA::SubSystemA()
{
    std::cout << "SubSystemA" << std::endl;
}

SubSystemA::~SubSystemA()
{
    std::cout << "~SubSystemA" << std::endl;
}

void SubSystemA::Operation()
{
    std::cout << "OperationA" << std::endl;
}

SubSystemB::SubSystemB()
{
    std::cout << "SubSystemB" << std::endl;
}

SubSystemB::~SubSystemB()
{
    std::cout << "~SubSystemB" << std::endl;
}

void SubSystemB::Operation()
{
    std::cout << "OperationB" << std::endl;
}

SubSystemC::SubSystemC()
{
    std::cout << "SubSystemC" << std::endl;
}

SubSystemC::~SubSystemC()
{
    std::cout << "~SubSystemC" << std::endl;
}

void SubSystemC::Operation()
{
    std::cout << "OperationC" << std::endl;
}

Facade::Facade()
{
    A = new SubSystemA;
    B = new SubSystemB;
    C = new SubSystemC;
}

Facade::~Facade()
{
    delete A;
    delete B;
    delete C;
}

void Facade::Operation()
{
    A->Operation();
    B->Operation();
    C->Operation();
}

